#define _CRT_SECURE_NO_WARNINGS
#include<stdlib.h>
#include<stdio.h>


struct ListNode
{
    int data;
    struct ListNode* next;
};

struct ListNode* reverseList(struct ListNode* head)
{
    if (head == NULL)
        return head;

    struct ListNode* cur = head;
    struct ListNode* old = NULL;
    struct ListNode* new = head;
    while (cur)
    {
        cur = cur->next;
        new->next = old;
        old = new;
        new = cur;
    }
    return old;
}

int main()
{

    return 0;
}